1.下载hadoop2.7.3最新源码
1 | [root@sht-sgmhadoopnn-01 ~]# mkdir -p learnproject/compilesoft |
2.安装依赖包
1 | [root@sht-sgmhadoopnn-01 compilesoft]# yum install svn autoconf automake libtool cmake ncurses-devel openssl-devel gcc* |
3.安装jdk
1 | [root@sht-sgmhadoopnn-01 compilesoft]# vi /etc/profile |
4.安装maven
1 | [root@sht-sgmhadoopnn-01compilesoft]# wget http://ftp.cuhk.edu.hk/pub/packages/apache.org/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz -O apache-maven-3.3.9-bin.tar.gz |
5.编译安装protobuf
1 | [root@sht-sgmhadoopnn-01compilesoft]# wget ftp://ftp.netbsd.org/pub/pkgsrc/distfiles/protobuf-2.5.0.tar.gz -O protobuf-2.5.0.tar.gz |
6.安装snappy
1 | [root@sht-sgmhadoopnn-01 compilesoft]# wget http://pkgs.fedoraproject.org/repo/pkgs/snappy/snappy-1.1.1.tar.gz/8887e3b7253b22a31f5486bca3cbc1c2/snappy-1.1.1.tar.gz |
7.编译
1 | [root@sht-sgmhadoopnn-01 compilesoft]# cd hadoop-2.7.3-src |
8.搭建HDFS HA,YARN HA集群(5个节点)
参考:
http://blog.itpub.net/30089851/viewspace-1994585/
https://github.com/Hackeruncle/Hadoop
9.搭建集群,验证版本和支持的压缩信息
1 | [root@sht-sgmhadoopnn-01 app]# hadoop version |
[参考]